package basic;

class NBATeam {
    public void replaceFirstPlayer(String[] players, String playName){
//        System.out.println("将第一个球员替换：");
        players[0] = playName;
        for (String player : players){
            System.out.print("==" +  player + "\t");
        }
        // 皮蓬 科比	欧文	乔丹
    }
    public static void main(String[] args) {
        String[] players = {"詹姆斯","科比","杜兰特","乔丹"};
        System.out.println("球队中现有球员：");
        for (String player : players){
            System.out.print(player + "\t");
        }
        System.out.println();
        players[2] = "欧文";
        NBATeam team = new NBATeam();
        team.replaceFirstPlayer(players,"皮蓬");
        System.out.println("替换后球员：");
        for (String player : players){
            System.out.print("++" + player + "\t");
        }
        // 皮蓬 科比	欧文	乔丹
    }
}
